//* test user defined error_category
#include <boost/system/error_code.hpp>
#include <iostream>
#include <string>

class application_category : public boost::system::error_category
{
public:
	virtual const char *name() const {return "application";}
	virtual std::string message( int ev ) const { return "error message"; }
};

int main()
{
	application_category app_cat;
	boost::system::error_code ec(14,app_cat);
	std::cout << ec.value() << std::endl;
	std::cout << ec.category().name() << std::endl;
	std::cout << ec.category().message(14) << std::endl;
}